Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Port Functions / Manipulating View Port Object Properties


GXSetViewPortMapping

You can use the GXSetViewPortMapping function to assign a mapping to a view port object.

void GXSetViewPortMapping(gxViewPort target, 
                           const gxMapping *map);
target
A reference to the view port object you want to assign the mapping to.
map
A pointer to a mapping structure containing the mapping matrix to assign to the target view port.
DESCRIPTION
The GXSetViewPortMapping function copies information from the mapping structure pointed to by the map parameter into the mapping property of the target view port.

You can specify nil for the map parameter, in which case this function sets the mapping property of the target view port as follows:

You can provide arbitrary values for the elements of the mapping structure pointed to by the map parameter, with one exception: the lower-right element of the matrix (element [2][2]) may not be 0.

ERRORS, WARNINGS, AND NOTICES
Errors 
invalid_viewPort_reference
viewPort_is_a_window(debugging version)
SEE ALSO
For examples of the use of this function, see Listing 7-3 on page 7-45 and Listing 7-5 on page 7-47.

To get a view port's mapping, use the GXGetViewPortMapping function, described in the previous section.

For information about the gxMapping structure, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996